import request from "../utils/requestjs.js";
//登录
export const POST_LOGIN = (data) => {
    return request({
        url: "/user/login",
        method: "POST",
        data
    })
}
//审核查询
export const GET_SHENHE = (params) => {
    return request({
        url: "/api/v1/audit",
        method: "GET",
        params
    })
}
//订单查询
export const GET_ORDER = (data) => {
    return request({
        url: "/api/v1/order",
        method: "GET",
        data
    })
}
//部门查询
export const GET_BM = (data) => {
    return request({
        url: "/staff/portList",
        method: "GET",
        data
    })
}

//部门新增
export const POST_BMXZ = (data) => {
    return request({
        url: "/staff/portAdd",
        method: "POST",
        data
    })
}
//部门删除
export const GET_DELECT = (params) => {
    return request({
        url: "/staff/portDel",
        method: "GET",
        params
    })
}
//部门编辑
export const POST_UPDATA = (data) => {
    return request({
        url: "/staff/portEdit",
        method: "POST",
        data
    })
}

//部门搜索
export const GET_Search = (params) => {
    return request({
        url: "/staff/portSearch",
        method: "GET",
        params
    })
}


//员工获取
export const GET_YG = () => {
    return request({
        url: "/staff/staffList",
        method: "GET",
    })
}

//添加员工
export const POST_ADDYG = (data) => {
    return request({
        url: "/staff/staffAdd",
        method: "POST",
        data
    })
}

//添加员工
export const POST_UPDATAYG = (data) => {
    return request({
        url: "/staff/staffEdit",
        method: "POST",
        data
    })
}

//删除员工
export const GET_DELECTYG = (id) => {
    return request({
        url: "/staff/staffDel",
        method: "GET",
        params: { id: id }
    })
}

//搜索员工
export const GET_SearchTYG = (params) => {
    return request({
        url: "/staff/staffSearch",
        method: "GET",
        params
    })
}



//经纪人接口
export const GET_BROKER = (params) => {
    return request({
        url: "/api/v1/broker",
        method: "GET",
        params
    })
}

//更改经纪人状态
export const GET_STATE = (data) => {
    return request({
        url: "/api/v1/broker/" + data.id,
        method: "PUT",
        data
    })
}

//增加经纪人
export const GET_ADDJJR = (data) => {
    return request({
        url: "/api/v1/broker",
        method: "POST",
        data
    })
}

//删除经纪人
export const GET_DELECTJJR = (data) => {
    return request({
        url: "/api/v1/broker/"+data.id,
        method: "DELETE",
        data
    })
}
